package com.hmall.user.controller;

import com.hmall.common.domain.R;
import com.hmall.user.domain.dto.AddResourceDTO;
import com.hmall.user.service.SysResourcesService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*********************************************************
 ** 资源管理controller
 ** <br><br>
 ** @ClassName: ResourceController
 ** @author: yangfeng
 ** @date: 2024/12/19 17:15
 ** @version: 1.0.0
 *********************************************************/
@RestController
@Slf4j
@RequestMapping("/resource")
@RequiredArgsConstructor
public class ResourceController {
    private final SysResourcesService sysResourcesService;
    @PostMapping
    public R<Boolean> add(@RequestBody AddResourceDTO dto){
        return R.ok(sysResourcesService.addResource(dto));
    }
}
